﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BBICMS.Model;
using BBICMS.Repository;

namespace BBICMS.Services
{
    public class ArticleService: EntityService<Post>, IArticleService
    {
        IUnitOfWork _unitOfWork;
        IArticleRepository _articleRepository;

        public ArticleService(IUnitOfWork unitOfWork, IArticleRepository articleRepository)
            : base(unitOfWork, articleRepository)
        {
            _unitOfWork = unitOfWork;
            _articleRepository = articleRepository;
        }


        public IEnumerable<Post> GetPublishArticles()
        {
            return _articleRepository.GetPublishArticles();
        }
    }
}
